package com.czxy.service;

import com.czxy.dao.OrderItemMapper;
import com.czxy.domain.OrderItem;
import com.czxy.utils.MyBatisUtils;

import java.util.List;

public class OrderItemService {

    /**
     * 把订单项集合 添加到数据库中
     * @param list
     */
    public void addItems(List<OrderItem> list){
        OrderItemMapper mapper = MyBatisUtils.getMapper(OrderItemMapper.class);
        mapper.addItems(list);
        MyBatisUtils.commitAndClose();
    }
}
